<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .b1 {
        background-image: url(../images/add1.png);
        background-size: 100vw 100vh;
      }
      .b2 {
        background-image: url(../images/add2.png);
        background-size: 100vw 100vh;
      }
      .b3 {
        background-image: url(../images/add3.png);
        background-size: 100vw 100vh;
      }
      .b4 {
        background-image: url(../images/add4.png);
        background-size: 100vw 100vh;
      }
      .b5 {
        background-image: url(../images/add5.png);
        background-size: 100vw 100vh;
      }
      .b6 {
        background-image: url(../images/add6.png);
        background-size: 100vw 100vh;
      }
    </style>
  </head>
  <body>
    <button>点我切换</button>
    <script>
      var btn = document.getElementsByTagName("button")[0];
      btn.onclick = function () {
        var num = Math.ceil(Math.random() * 5);
        document.body.className = `b${num}`;
      };
    </script>
  </body>
</html>
